﻿<%@ page language="java" import="java.util.*,code.bean.*,code.util.*" pageEncoding="UTF-8"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
	String cmd = ParamUtils.getAttribute(request, "cmd", "");
	String userid = ParamUtils.getParameter(request, "userid", "");
	String spaceName = ParamUtils.getParameter(request, "spaceName", "");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>搜索</title>
    
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <META http-equiv="content-Type" content="text/html;charset=UTF-8">
    
		<link href="css/s.css" rel="stylesheet" type="text/css" />
        <link href="css/comment_7.css" rel="stylesheet" type="text/css" />
		
		<SCRIPT language="javascript" src="js/code.js"></SCRIPT>
		<SCRIPT language="javascript" src="js/http.js"></SCRIPT>
		<script language="javascript">
			function checkForm() {
				var myForm = document.articleForm;
				if(myForm.title.value==""){
					alert("标题不能空!");
					return false;
				}
				return true;
			}
		</script>
  </head>
  
  <body>
  <div id="head">
	<div class="hd">
		<div class="l tac wl2" style="width:720px;padding:3px;">
		<table width="100%"><tr>
			<td><div style="padding-left:15px;"><a href="servlet/ShowIndex1"><img src="images/pcslogo.gif"/></a></div></td>
			<td class="ce" style="font-size:14px">
			&nbsp;<a href="servlet/ShowSpace?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="ce">主页</a>&nbsp;┊
			&nbsp;<a href="servlet/ShowCode?userid=<%=ParamUtils.getParameter(request, "userid", "")%>&blogdate=<%=DateUtils.format(Calendar.getInstance().getTime())%>" class="ce">我的代码</a>&nbsp;┊
			&nbsp;<a href="servlet/ShowShare?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="ce">我的收藏</a>&nbsp;┊
			&nbsp;<a href="servlet/ShowProfile?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="ce">用户信息</a>&nbsp;┊
			&nbsp;<a href="servlet/ManageCode?userid=<%=ParamUtils.getParameter(request, "userid", "")%>&cmd=add" class="ce">发布代码</a>&nbsp;┊
			&nbsp;<a href="../CodeSharer/advSearch.jsp?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="ce">搜索</a>
			
			<%
				if(session.getAttribute("loginUser") != null && ((User)(session.getAttribute("loginUser"))).getId().equals(ParamUtils.getParameter(request, "userid", "")))
			    { 
					out.println("&nbsp;┊&nbsp;<a href=\"servlet/CodeList?userid=" + ParamUtils.getParameter(request, "userid", "") + "\" class=\"ce"+"\">代码管理</a>");
				    out.println("&nbsp;┊&nbsp;<a href=\"servlet/ShareList?userid=" + ParamUtils.getParameter(request, "userid", "") + "\" class=\"ce"+"\">收藏管理</a>");
				    out.println("&nbsp;┊&nbsp;<a href=\"servlet/DoLogout" + "\" class=\"ce"+"\">退出</a>");
				}
			%>
			</td>
		</tr></table>
		</div>
		<div align="right">
			<table>
			<tr>
			<td>
			    <div style="padding:4px;"></div>
				<form name="" action="servlet/SearchCodeByTitle?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" method="post">
				<input type="text" name = "title1" value="" maxlength="15"/>
				<input type="submit" class="signinbtn1" value="搜标题"/>
				</form>
			</td>
			<td>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<%if(session.getAttribute("loginUser") != null){ %>
			<a href="servlet/ShowSpace?userid=<%=
			((User)
			(session.getAttribute
			("loginUser"))).getId()
			%>" class="ce" style="font-size:16px">
			<%=((User)
			(session.getAttribute
			("loginUser"))).getNickName()%>
			</a>
			<%}%>
			</td>
			</tr>
			</table>
		</div>
		<div class="c"></div>
	</div>
</div>
		
<div id="main">
	<div class="m1 wl2" style="width:230px;">
    	<div class="m1t"></div>
        <div style="padding:15px 0 0 15px;">
		
		    <div class="f13 ml20"><span style="font:bold 20px '黑体'; color:#D01E3B;">CodeSharer<br /></span> </div>
		    <div style="background:url(images/index_app.gif) repeat-x;width:190px;margin:20px auto 15px 7px;height:2px;"></div>

            <div id="text1div" class="f13 ml20"><img src="images/arrow_l.gif" align="absmiddle" />这里是帮助你管理你的代码，并与你的朋友、同事、同学一起分享代码的真实平台</div>
	     
			<div style="background:url(images/index_app.gif) repeat-x;width:190px;margin:20px auto 15px 7px;height:2px;"></div>
						
			<div id="text1div" class="f13 ml20"><img src="images/arrow_l.gif" align="absmiddle" />支持代码高亮显示</div>
			<div style="padding:2px;"></div>
			<div id="text1div" class="f13 ml20"><img src="images/arrow_l.gif" align="absmiddle" />支持代码版本控制</div>
			<div style="padding:2px;"></div>
			<div id="text1div" class="f13 ml20"><img src="images/arrow_l.gif" align="absmiddle" />支持代码分享、收藏、评论</div>
			<div style="padding:10px;"></div>
	  </div>
    </div>
	
	<div class="m2 wr2" style="width:770px;">
	  <div id="r2s_2">
		<div id="r2l" style="width:700px;">
			<div style="padding:10px;"></div>
			<div style="font: 16px '黑体'; color:#D01E3B;">
			 <form name="articleForm" action="servlet/SearchCode?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" method="post">
		    
		    <div style="padding:10px;"></div>
		        
		    <div id="r231">
				<div class="zc1" >搜代码<span>&nbsp;</span></div>
			</div>
			
			<div style="padding:5px;"></div>
			
			<div id="r232">
				<div class="zc1">标题：</div>
				<div class="zc2">
					<span class="it_s"><input name="title" class="it1" size="20"/></span>
					<span>*</span>
				</div>	
			</div>
			
			<div style="padding:5px;"></div>
			
			<div id="r233">
				<div class="zc1">标签：<span>&nbsp;</span></div>
				<div class="zc2">
					<span class="it_s"><input name="category" class="it1" size="20"/></span>
				</div>	
			</div>
			
			<div style="padding:5px;"></div>
			
			<div id="r235">
				<div class="zc1">语言：<span>&nbsp;</span></div>
				<div class="zc1">
					
					<select name="lang">
		          		<option value="">全部语言</option>
			          	<option value="CPP">C++</option>
			          	<option value="Java">Java</option>
			          	<option value="Csharp">C#</option>
			        	<option value="PHP">PHP</option>
			          	<option value="JScript">JScript</option>
			          	<option value="Vb">Vb</option>
			            <option value="Sql">Sql</option>
			          	<option value="Delphi">Delphi</option>
			          	<option value="Xml">Xml</option>
			          	<option value="Python">Python</option>
			          	<option value="Rub">Ruby</option>
			          	<option value="Css">Css</option>
						</select>
					
				</div>
			</div>
			
			<div style="padding:5px;"></div>
			
		    <div id="r23h" >
				<div class="zc1" >&nbsp;</div>
			    <div class="zc2"  style="padding-top:45px;*padding-top:35px ! important;*padding-top:45px;">
			       <span class="ty_s" style="float:none;"><INPUT type="button" value="搜索" class="ty1" onMouseOver="this.className='ty2';" onMouseOut="this.className='ty1';" onclick="if(checkForm()) document.articleForm.submit();"></span>
			        <span class="ty_s" style="float:none;"><INPUT type="button" class="ty1" onMouseOver="this.className='ty2';" onMouseOut="this.className='ty1';" value="返回" onclick="history.back(-1)"></span>
			   </div>
			</div>
			
		  </form>
		      <div style="padding:15px;"></div>
		</div>
			
	</div></div></div>
		<div style="padding:15px;"></div>

</div>
	
<div id="b">
	<div class="b1"><a href="#" class="c6" target="_blank">关于我们</a><span>┊</span><a href="/s/contact.html" class="c6" target="_blank">联系方式</a><span>┊</span><a href="/t/feedback.html" class="c6" target="_blank">意见反馈</a><span>┊</span><a href="/s/help.html" class="c6" target="_blank">帮助中心</a>　 &nbsp;<a class=c6 href=http://www.miibeian.gov.cn target=_blank>NENU</a> <img src="images/gs.gif" width="15" align="absmiddle" />&nbsp;<img src="images/jc.gif" width="17" align="absmiddle" /></div>

</div>
 
 </body>
</html>